package com.jml.dubbo.server.loadBalance.impl;

import java.util.List;
import java.util.Random;

import com.jml.dubbo.server.loadBalance.LoadBalance;

/**
 * 随机算法
 */
public class RandomLoadBalance implements LoadBalance {
    @Override
    public String select(List<String> repos) {
        String value = repos.get(new Random().nextInt(repos.size()));
        System.out.println(value);
        return value;
    }
}
